import json
import os

# user_name = "henan46"
# password = "Qaz1029wsx!"
# user_name = "henanyunying075"
# password = "XYjh@456789"
# user_name = "hnsf0416"
# password = "test@123456"

config = {}
def init_config():
    global config
    #config_path = os.path.join(os.path.dirname(__file__), 'config', 'config.json')
    config_path = r'C:\config\config_invoice_system.json'
    with open(config_path, 'r', encoding='utf-8-sig') as config_file:
        config = json.load(config_file)
    return config

init_config()
chrome_driver_path = config["chrome_driver_path"]
is_console = config["is_console"]
delay_time = config["delay_time"]
user_name = config["user_name"]
password = config["password"]
port = config["port"]

appid = config["appid"]
print(config)

'''
更新日志：
v1.0.1
1.新增功能
通过passid获取数据时，返回的数据会加上字段名

v1.1.0
1.新增功能
每次请求无需重启浏览器



'''